﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Edit.ascx.cs" Inherits="WebClient.admin.Modules.userGroups.Edit" %>
<script type="text/javascript">
    var txtMy = "ctl00_contentCtrl_ctl00_txt";
    var Err = "Err";
    var ArrField = new Array("id", "groupName", "description", "isActive");
    function ClearAll() {
        var l = ArrField.length;
        for (var i = 0; i < l; i++) {
            var myVal = document.getElementById(txtMy + ArrField[i]);
            myVal.value = "";

        }

        HideAll();
        var myCtrl = document.getElementById(txtMy + ArrField[0]);
        myCtrl.focus();
        return false;
    }
    function HideAll() {
        var l = ArrField.length;
        for (var i = 0; i < l; i++) {
            var myVal = document.getElementById(Err + ArrField[i]);
            myVal.style.display = 'none';
        }
        return false;
    }
    function OnSubmitClick() {
        HideAll();
        var errExisting = false;
        var l = ArrField.length;
        var Errfocus = false;
        for (var i = 0; i < l; i++) {
            var myVal = document.getElementById(txtMy + ArrField[i]);
            if (myVal.value == "") {
                var obj = document.getElementById(Err + ArrField[i]);
                obj.style.display = 'block';
                errExisting = true;
            }
            if (errExisting && !Errfocus) {
                myVal.focus();
                Errfocus = true;
            }
        }

        return !errExisting;
    }   
</script>
<table cellpadding="0" cellspacing="0" border="0">
    <tr height="25">
        <td>
            <span style="font-family: Helvetica; font-size: 13px; color: Green; font-weight: bold">
                Th�m nick yahoo m?i</span></td>
    </tr>
    
    <tr>
        <td>
            <div runat="server" id="MyUpdate">
                <table id='tbSearch' width="735" cellpadding="2" cellspacing="0" rules="rows"  border="1"
                    style="border-collapse: collapse">
					 <tr>
						<td align="left" class="left">id :</td>
						<td class="center"><asp:TextBox width="300px" id="txtid" runat="server" 
						 textmode="SingleLine" CssClass="lsbOpenDay" emptymessage="" skin="Outlook" EnableViewState="true"></asp:TextBox><span>(*)</span></td >
						<td class="right" ><div id="Errid" class="Err" style="display:none;">Lỗi</div></td>
					</tr>
					 <tr>
						<td align="left" class="left">groupName :</td>
						<td class="center"><asp:TextBox width="300px" id="txtgroupName" runat="server" 
						 textmode="SingleLine" CssClass="lsbOpenDay" emptymessage="" skin="Outlook" EnableViewState="true"></asp:TextBox><span>(*)</span></td >
						<td class="right" ><div id="ErrgroupName" class="Err" style="display:none;">Lỗi</div></td>
					</tr>
					 <tr>
						<td align="left" class="left">description :</td>
						<td class="center"><asp:TextBox width="300px" id="txtdescription" runat="server" 
						 textmode="SingleLine" CssClass="lsbOpenDay" emptymessage="" skin="Outlook" EnableViewState="true"></asp:TextBox><span>(*)</span></td >
						<td class="right" ><div id="Errdescription" class="Err" style="display:none;">Lỗi</div></td>
					</tr>
					 <tr>
						<td align="left" class="left">isActive :</td>
						<td class="center"><asp:TextBox width="300px" id="txtisActive" runat="server" 
						 textmode="SingleLine" CssClass="lsbOpenDay" emptymessage="" skin="Outlook" EnableViewState="true"></asp:TextBox><span>(*)</span></td >
						<td class="right" ><div id="ErrisActive" class="Err" style="display:none;">Lỗi</div></td>
					</tr>
					<tr>
						<td align="center" colspan="3">
							<asp:Button runat="server" ID="btnAddNew" Text="Thêm mới" Font-Names="Helvetica"
							BorderStyle="Solid" BorderWidth="1" onclick="btnAddNew_Click"/>
							<asp:Button runat="server" ID="btnCancel" Text="Nhập lại" Font-Names="Helvetica"
							BorderStyle="Solid" BorderWidth="1"/>
						</td>
					</tr>
				</table>
			</div>
		</td>
	</tr>
</table>
